package middleware

import (
	"beta/pkg/e"
	"github.com/gin-gonic/gin"
	"github.com/segmentio/ksuid"
)

func GinTrace() gin.HandlerFunc {
	return func(c *gin.Context) {
		traceID := ksuid.New().String()
		c.Request.Header.Set(e.TraceName, traceID)
		c.Next()
	}
}